package com.kedou.sdk.params;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * Created by Administrator on 2017/6/7 0007.
 */

public class BindPhoneResponseParams extends ResponseParams<BindPhoneResponseParams.BindPhoneResponseData> {

    public static class BindPhoneResponseData implements Parcelable{

        private String id;
        private String name;
        private String nickname;
        private String phone;
        private String avatar;
        private String password;
        private String login_ip;
        private String login_time;
        private String reg_ip;
        private String reg_time;
        private String reg_from;
        private String reg_platform;
        private String login_limit;
        private String operation_time;
        private String openid;
        private String status;
        private String user_rank_level;
        private String user_rank_score;
        private String email;
        private String id_card;
        private String realname;
        private String is_email_valid;
        private String is_idcard_valid;
        private String channel_id;
        private String game_id;
        private String server_id;
        private String role;
        private String ticket;
        private String expires_in;
        private int isAdult;
        private String contact_name;
        private String contact_pic_url;


        /**
         * 是否是进行的身份证绑定操作
         */
        @SerializedName("is_set_card")
        private int realNameCertified;


        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getNickname() {
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getAvatar() {
            return avatar;
        }

        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        public String getLogin_ip() {
            return login_ip;
        }

        public void setLogin_ip(String login_ip) {
            this.login_ip = login_ip;
        }

        public String getLogin_time() {
            return login_time;
        }

        public void setLogin_time(String login_time) {
            this.login_time = login_time;
        }

        public String getReg_ip() {
            return reg_ip;
        }

        public void setReg_ip(String reg_ip) {
            this.reg_ip = reg_ip;
        }

        public String getReg_time() {
            return reg_time;
        }

        public void setReg_time(String reg_time) {
            this.reg_time = reg_time;
        }

        public String getReg_from() {
            return reg_from;
        }

        public void setReg_from(String reg_from) {
            this.reg_from = reg_from;
        }

        public String getReg_platform() {
            return reg_platform;
        }

        public void setReg_platform(String reg_platform) {
            this.reg_platform = reg_platform;
        }

        public String getLogin_limit() {
            return login_limit;
        }

        public void setLogin_limit(String login_limit) {
            this.login_limit = login_limit;
        }

        public String getOperation_time() {
            return operation_time;
        }

        public void setOperation_time(String operation_time) {
            this.operation_time = operation_time;
        }

        public String getOpenid() {
            return openid;
        }

        public void setOpenid(String openid) {
            this.openid = openid;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getUser_rank_level() {
            return user_rank_level;
        }

        public void setUser_rank_level(String user_rank_level) {
            this.user_rank_level = user_rank_level;
        }

        public String getUser_rank_score() {
            return user_rank_score;
        }

        public void setUser_rank_score(String user_rank_score) {
            this.user_rank_score = user_rank_score;
        }

        public String getEmail() {
            return email;
        }

        public void setEmail(String email) {
            this.email = email;
        }

        public String getId_card() {
            return id_card;
        }

        public void setId_card(String id_card) {
            this.id_card = id_card;
        }

        public String getRealname() {
            return realname;
        }

        public void setRealname(String realname) {
            this.realname = realname;
        }

        public String getIs_email_valid() {
            return is_email_valid;
        }

        public void setIs_email_valid(String is_email_valid) {
            this.is_email_valid = is_email_valid;
        }

        public String getIs_idcard_valid() {
            return is_idcard_valid;
        }

        public void setIs_idcard_valid(String is_idcard_valid) {
            this.is_idcard_valid = is_idcard_valid;
        }

        public String getChannel_id() {
            return channel_id;
        }

        public void setChannel_id(String channel_id) {
            this.channel_id = channel_id;
        }

        public String getGame_id() {
            return game_id;
        }

        public void setGame_id(String game_id) {
            this.game_id = game_id;
        }

        public String getServer_id() {
            return server_id;
        }

        public void setServer_id(String server_id) {
            this.server_id = server_id;
        }

        public String getRole() {
            return role;
        }

        public void setRole(String role) {
            this.role = role;
        }

        public String getTicket() {
            return ticket;
        }

        public void setTicket(String ticket) {
            this.ticket = ticket;
        }

        public String getExpires_in() {
            return expires_in;
        }

        public void setExpires_in(String expires_in) {
            this.expires_in = expires_in;
        }

        public boolean isAdult() {
            return isAdult > 0;
        }

        public void setIsAdult(int isAdult) {
            this.isAdult = isAdult;
        }

        public String getContact_name() {
            return contact_name;
        }

        public void setContact_name(String contact_name) {
            this.contact_name = contact_name;
        }

        public String getContact_pic_url() {
            return contact_pic_url;
        }

        public void setContact_pic_url(String contact_pic_url) {
            this.contact_pic_url = contact_pic_url;
        }

        /**
         * 判断是否有进行实名认证操作/身份证绑定操作
         * @return
         */
        public boolean isRealNameCertified(){
            return realNameCertified > 0;
        }

        public void setRealNameCertified(int realNameCertified) {
            this.realNameCertified = realNameCertified;
        }

        public static Creator<BindPhoneResponseData> getCREATOR() {
            return CREATOR;
        }

        public BindPhoneResponseData() {
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.name);
            dest.writeString(this.nickname);
            dest.writeString(this.phone);
            dest.writeString(this.avatar);
            dest.writeString(this.password);
            dest.writeString(this.login_ip);
            dest.writeString(this.login_time);
            dest.writeString(this.reg_ip);
            dest.writeString(this.reg_time);
            dest.writeString(this.reg_from);
            dest.writeString(this.reg_platform);
            dest.writeString(this.login_limit);
            dest.writeString(this.operation_time);
            dest.writeString(this.openid);
            dest.writeString(this.status);
            dest.writeString(this.user_rank_level);
            dest.writeString(this.user_rank_score);
            dest.writeString(this.email);
            dest.writeString(this.id_card);
            dest.writeString(this.realname);
            dest.writeString(this.is_email_valid);
            dest.writeString(this.is_idcard_valid);
            dest.writeString(this.channel_id);
            dest.writeString(this.game_id);
            dest.writeString(this.server_id);
            dest.writeString(this.role);
            dest.writeString(this.ticket);
            dest.writeString(this.expires_in);
            dest.writeInt(this.isAdult);
            dest.writeInt(this.realNameCertified);
            dest.writeString(this.contact_name);
            dest.writeString(this.contact_pic_url);
        }

        protected BindPhoneResponseData(Parcel in) {
            this.id = in.readString();
            this.name = in.readString();
            this.nickname = in.readString();
            this.phone = in.readString();
            this.avatar = in.readString();
            this.password = in.readString();
            this.login_ip = in.readString();
            this.login_time = in.readString();
            this.reg_ip = in.readString();
            this.reg_time = in.readString();
            this.reg_from = in.readString();
            this.reg_platform = in.readString();
            this.login_limit = in.readString();
            this.operation_time = in.readString();
            this.openid = in.readString();
            this.status = in.readString();
            this.user_rank_level = in.readString();
            this.user_rank_score = in.readString();
            this.email = in.readString();
            this.id_card = in.readString();
            this.realname = in.readString();
            this.is_email_valid = in.readString();
            this.is_idcard_valid = in.readString();
            this.channel_id = in.readString();
            this.game_id = in.readString();
            this.server_id = in.readString();
            this.role = in.readString();
            this.ticket = in.readString();
            this.expires_in = in.readString();
            this.isAdult = in.readInt();
            this.realNameCertified = in.readInt();
            this.contact_name = in.readString();
            this.contact_pic_url = in.readString();
        }

        public static final Creator<BindPhoneResponseData> CREATOR = new Creator<BindPhoneResponseData>() {
            @Override
            public BindPhoneResponseData createFromParcel(Parcel source) {
                return new BindPhoneResponseData(source);
            }

            @Override
            public BindPhoneResponseData[] newArray(int size) {
                return new BindPhoneResponseData[size];
            }
        };
    }

}
